#pragma once

#include "../radar.h"
#include "OwnProtocol.h"

#define OWNRADARSPOKES (2048)
#define OWNRADARSPOKELEN (1024)

class OwnRadar : public Radar
{
public:
    OwnRadar(boost::asio::io_service& io_service);
    virtual ~OwnRadar();

    virtual bool do_video_processer(const char *data, unsigned int length);
    virtual void do_status_processer(const char *data, unsigned int length, unsigned int radar_key = 0);
    virtual void StartOwnProcess();
private:
    void OnRadarRangeChanged(unsigned int range);

    void convertData(short *data, unsigned int length);

    unsigned int m_old_range;

    std::string m_single_data;

    char m_radar_buffer[OWNRADARSPOKES];
};